import 'package:flutter/material.dart';

class GamePageProvider extends ChangeNotifier {

  /// Tab的下标
  int _index = 0;
  int get index => _index;
  /// 赛事数量
  final List<int> _gameCountList = [0, 0,0];
  final List<int> _gameDateTyleList = [2,3,1];
  List<int> get gameCountList => _gameCountList;
  int? get dateType => _gameDateTyleList[this._index];

  /// 选中赛事分类下标
  int _sortIndex = 0;
  int get sortIndex => _sortIndex;

  void setSortIndex(int sortIndex) {
    _sortIndex = sortIndex;
    notifyListeners();
  }
 
  void setIndex(int index) {
    _index = index;
    notifyListeners();
  }

  void setGameCount(int count) {
    _gameCountList[index] = count;
    notifyListeners();
  }
}
